<?php

namespace app\index\controller;

use app\BaseController;
use think\facade\Db;

class Index extends BaseController
{
    public function index()
    {
        return view();
    }

    public function hello($name = 'ThinkPHP6')
    {
        return 'hello,' . $name;
    }
    public function think($name = 'ThinkPHP6')
    {
        return 'hesss,' . $name;
    }
    public function demo1()
    {
        $sql = "SELECT `code` FROM `lm_config` WHERE `id`=:id ";
        $map = ['id' => 1];
        $res = Db::query($sql, $map);
        dump($res);//打印查询结果$res
    }
}
